package chixing.day09.homework.work5;

import chixing.day09.homework.work5.Product;

public class ElectronicProduct extends Product {

    public ElectronicProduct() {
    }

    public ElectronicProduct(String proId, String proName, float proPrice) {
        super(proId, proName, proPrice);
    }

    //大于两千元减少20%
    @Override
    public double getDiscountedPrice() {
        if (super.getProPrice() >= 2000)
            return super.getProPrice() - super.getProPrice()*0.2;
        return super.getProPrice();
    }
}
